//
//  SystemSecretaryDetailViewController.m
//  安好
//
//  Created by qinlongqing on 14/12/12.
//  Copyright (c) 2014年 lianchuangbrother. All rights reserved.
//

#import "SystemSecretaryDetailViewController.h"

@interface SystemSecretaryDetailViewController ()<UIWebViewDelegate>
{
    UIWebView *webView;
}
@end

@implementation SystemSecretaryDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    [self makeNavBar];
    
    webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight - 64)];
    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.url]]];
    [self showActionView];
    webView.delegate = self;
    [self.view addSubview:webView];
}

-(void)makeNavBar{
    self.navigationItem.title = self.titleString;

    UIBarButtonItem *backBtnImg = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"公用_返回.png"] style:UIBarButtonItemStylePlain target:self action:@selector(backBtnclicked)];
    backBtnImg.tintColor = [UIColor whiteColor];
    self.navigationItem.leftBarButtonItem = backBtnImg;
}

- (void)backBtnclicked{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)webViewDidFinishLoad:(UIWebView *)webView{
    [self hiddenActionView];
}

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
    [self hiddenActionView];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
